package com.cheyun.netsalev3.bean

import com.cheyun.netsalev3.utils.FunctionUtils
import com.cheyun.netsalev3.utils.LunarCalendar
import java.text.SimpleDateFormat
import java.util.*
import kotlin.collections.ArrayList

data class PersonlistParam(
        val arrive_data: List<ConnectData>,
        val arrive_total: String,
        val connect_data: List<ConnectData>,
        val connect_total: String,
        val followed: String,
        val no_follow: String,
        val outtotal: String,
        val seven_turn: String,
        val total: String,
        val missed:String,
        var receive_total:String,
        var reservetotal:String,
        var pondtotal:String
) {
    constructor() : this(
            ArrayList<ConnectData>(),
            "",
            ArrayList<ConnectData>(),
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",""
    )

    //日期
    var calendar = java.util.Calendar.getInstance()
    //用于日期显示的字符串
    var timeData = ""
    private var dateFormat = SimpleDateFormat("yyyy年MM月dd日")
    fun setTimData() {
        timeData = ""
        timeData = dateFormat.format(calendar.timeInMillis)
        var time = LunarCalendar.solarToLunar(calendar.get(Calendar.YEAR),
                calendar.get(Calendar.MONTH) + 1,
                calendar.get(Calendar.DAY_OF_MONTH)
        )
        timeData += " / 星期" + FunctionUtils.calendarWeek(calendar.get(Calendar.DAY_OF_WEEK)) + " / " + LunarCalendar.getChinaDate(time[2])

    }
}